package com.bup.gn.utils;

import javax.servlet.http.HttpServletRequest;

public class AppUtils {
    public static String getPrefixUrl(HttpServletRequest request) {
        String url = request.getRequestURL().toString();
        int index = url.indexOf("://");
        String first = url.substring(0, index);
        String second = url.substring(index + 3);
        return first + "://" + second.substring(0, second.indexOf("/")) + "/";
    }
}
